package model_layer;

/**
 * Class used for manipulation the data of a Product as an Object of type Product.
 * Products are not deleted from the system, they are just marked as such
 * (changing the value of the field deleted), but still stored in the system
 * for further reference and safety purposes.
 */
public class Product
{

	private String id;
	private String name;
	private float price;
	private float last_retail_price;
	private int quantity;
	private int min_amount;
	private boolean deleted;

	/**
	 * Instantiates a new product.
	 */
	public Product()
	{
	}

	/**
	 * Gets the id of a product.
	 *
	 * @return the id of a product as a String.
	 */
	public String getId()
	{
		return id;
	}

	/**
	 * Gets the name of a product.
	 *
	 * @return the name of a product as a String.
	 */
	public String getName()
	{
		return name;
	}

	/**
	 * Gets the price of a pdouct.
	 *
	 * @return the price of a product as a Float.
	 */
	public float getPrice()
	{
		return price;
	}

	/**
	 * Gets the quantity of a product that the company has in stock.
	 *
	 * @return the quantity of type Integer
	 */
	public int getQuantity()
	{
		return quantity;
	}

	/**
	 * Gets the minimum amount that a product
	 * can reach before it would need restocking.
	 *
	 * @return the minimum as an Integer.
	 */
	public int getMin_amount()
	{
		return min_amount;
	}

	/**
	 * Sets the id of a product.
	 *
	 * @param id the new desired id.
	 */
	public void setId(String id)
	{
		this.id = id;
	}

	/**
	 * Sets the name of a product.
	 *
	 * @param name the new name as a String value.
	 */
	public void setName(String name)
	{
		this.name = name;
	}

	/**
	 * Sets the price of a product.
	 *
	 * @param price the desired new price of a product. 
	 */
	public void setPrice(float price)
	{
		this.price = price;
	}

	/**
	 * Sets the quantity of a product.
	 *
	 * @param quantity the new quantity to be set.
	 */
	public void setQuantity(int quantity)
	{
		this.quantity = quantity;
	}

	/**
	 * Sets the minimum amount that a product is allowed to reach.
	 *
	 * @param min_amount the new desired minimum amount that has to be set as an integer value.
	 */
	public void setMin_amount(int min_amount)
	{
		this.min_amount = min_amount;
	}

	/**
	 * Gets the last retail price used for a product.
	 *
	 * @return the retail price of a product of a type float.
	 */
	public float getLast_retail_price()
	{
		return last_retail_price;
	}

	/**
	 * Sets the last retail price used for a product.
	 *
	 * @param last_retail_price the desired new retail price.
	 */
	public void setLast_retail_price(float last_retail_price)
	{
		this.last_retail_price = last_retail_price;
	}

	/**
	 * Checks if a product was marked as deleted.
	 *
	 * @return a Boolean Statement - e.g. true, if is deleted
	 */
	public boolean isDeleted()
	{
		return deleted;
	}

	/**
	 * Changes the product status to deleted or non-deleted.
	 *
	 * @param deleted contains boolean value which states if the product is deleted.
	 */
	public void setDeleted(boolean deleted)
	{
		this.deleted = deleted;
	}
	
	

}
